import java.util.ArrayList;
import java.util.List;

import Car.ACar;
import Car.CarFactory;

public class App {
    public static void main(String[] args) throws Exception {
        List<ACar> MyCarList = new ArrayList<ACar>();
        MyCarList.add(CarFactory.getCarByName("BaoMa"));
        MyCarList.add(CarFactory.getCarByName("BYD"));
        MyCarList.add(CarFactory.getCarByName("BenChi"));
        MyCarList.add(CarFactory.getCarByName("BYD"));
        for (ACar car : MyCarList) {
            System.err.println(car.ShowMyName());
        }
    }
}
